package com.rp.configure.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rp.configure.entity.Subject;
import com.rp.configure.mapper.SubjectMapper;
import com.rp.configure.service.SubjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author vicente
 * @since 2021-07-16
 */
@Service
public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> implements SubjectService {
    @Autowired
    SubjectMapper subjectMapper;

    @Override
    public IPage<Subject> listByUserId(Page<Subject> subjectPage, String userId) {

        return subjectMapper.listByUserId(subjectPage,userId);
    }

    @Override
    public List<Subject> getList(String userId) {
        return subjectMapper.getList(userId);
    }
}
